fix nmea writer date bug. (#553)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Thu, 7 May 2020 12:31:39 +0000 (06:31 -0600)
committerGitHub <noreply@github.com>
Thu, 7 May 2020 12:31:39 +0000 (06:31 -0600)
commit73d2af755b041fd1279f08da7f0fc357f5da8af8
tree73fca3bc303c94f8141cb54397876b788b95cfb2
parentfb3788a4741014158b032985a4faf444730cd3ae
fix nmea writer date bug. (#553)

* fix nmea writer date bug.

dates before 2000 were written with a month off by one.

This also changes the behavior when the creation time is invalid.
Previously you would get data related to the unix epoch for the date
and time fields.
Now you get empty fields, i.e. ",,"

* fix magellan writer date bug.

This had the same bug as nmea.  It had an additional bug
when it attempted to round the fractional part of a second.  Rounding
can ripple all the way from the fractional part of a second to the year,
as is now demonstrated in the testcase.

Like nmea, magellan will now print empty fields if the creation time
is invalid.

* fix date bug in gpssim.

This is the same bug as in nmea, magproto.
gpssim.cc
magproto.cc
nmea.cc
reference/track/magellandate.log [new file with mode: 0644]
reference/track/nmeadate.gpssim [new file with mode: 0644]
reference/track/nmeadate.gpx [new file with mode: 0644]
reference/track/nmeadate.nmea [new file with mode: 0644]
testo.d/gpssim.test
testo.d/magellan.test
testo.d/nmea.test